import { Pipe, PipeTransform } from '@angular/core';
import { ToolService } from '../service/tool.service';

@Pipe({
  name: 'cltime'
})
export class CltimePipe implements PipeTransform {

  transform(value: any, args?: any): any {
    if (ToolService.isEmpty(value) || parseFloat(value)<=0) {
      return "--";
    } else {
      return ToolService.formateTime(value, true);
    }
  }

}
